﻿Partial Class FileManager

    Public NotInheritable Class DownLoadManager

        'Private Shared ReadOnly Property DownLoadForm As DownLoadManagerForm
        '    Get
        '        If _DownLoadForm Is Nothing Then
        '            _DownLoadForm = New DownLoadManagerForm(FileManager.DownLoadManager.Manager)
        '            '设置窗体初始位置
        '            Dim Width As Integer = System.Windows.Forms.SystemInformation.WorkingArea.Width '获取屏幕的宽度
        '            Dim Height As Integer = SystemInformation.WorkingArea.Height '获取屏幕的高度
        '            _DownLoadForm.StartPosition = FormStartPosition.Manual
        '            Dim StartPoint As New System.Drawing.Point
        '            StartPoint.X = Width - _DownLoadForm.Width
        '            StartPoint.Y = Height - _DownLoadForm.Height
        '            _DownLoadForm.Location = StartPoint
        '        End If
        '        Return _DownLoadForm
        '    End Get
        'End Property
        'Private Shared _DownLoadForm As DownLoadManagerForm

        'Public Shared Sub Add(ByVal Item As BI.ExternalLib.FileService.DownLoadManager.Item)
        '    FileManager.DownLoadManager.Manager.Items.Add(Item)
        '    Dim dr As  Marmat.Forms.Views.DataGrid.Row = FileManager.DownLoadManager.DownLoadForm.BDataGrid1.AddNew
        '    dr("Tag") = Item
        'End Sub

        'Public Shared Sub Start()
        '    FileManager.DownLoadManager.Manager.Start()
        'End Sub

        'Private Shared ReadOnly Property Manager As BI.ExternalLib.FileService.DownLoadManager
        '    Get
        '        If _Manager Is Nothing Then
        '            _Manager = New BI.ExternalLib.FileService.DownLoadManager
        '        End If
        '        Return _Manager
        '    End Get
        'End Property
        'Private Shared _Manager As BI.ExternalLib.FileService.DownLoadManager

        'Public Shared Sub ShowDownLoadForm()
        '    If FileManager.DownLoadManager.DownLoadForm.Visible = False Then
        '        FileManager.DownLoadManager.DownLoadForm.WindowState = FormWindowState.Normal
        '        FileManager.DownLoadManager.DownLoadForm.Show()
        '        FileManager.DownLoadManager.DownLoadForm.Visible = True
        '    End If
        'End Sub

        'Public Shared Sub CloseDownLoadForm()
        '    If FileManager.DownLoadManager.DownLoadForm.Visible Then
        '        FileManager.DownLoadManager.DownLoadForm.Visible = False
        '        FileManager.DownLoadManager.DownLoadForm.WindowState = FormWindowState.Minimized
        '    End If
        'End Sub
    End Class

End Class